#!/bin/sh
################################################################################
# modules_manual
################################################################################
. /etc/rc.d/functions

start() {

    local kernel_module

    /usr/bin/logger -s -t minimyth -p "local0.info" "[init.d/modules_manual] Starting..."

    mm_message_output info "loading kernel modules (manual) ..."

    # Load hardware based kernel modules that are not auto-detected.
    for kernel_module in ${MM_HARDWARE_KERNEL_MODULES} ; do
        /usr/bin/logger -s -t minimyth -p "local0.info" "[init.d/modules_manual] loading ${kernel_module} kernel module..."
        if ! /sbin/modprobe ${kernel_module} > /dev/null 2>&1 ; then
            mm_message_output warn "warning: failed to load kernel module: ${kernel_module}"
        fi
    done

    /usr/bin/logger -s -t minimyth -p "local0.info" "[init.d/modules_manual] Started with return code=0..."

    return 0
}

stop() {

    mm_message_output info "unloading kernel modules (manual) ..."

    return 0
}

case $1 in
    start) start ;;
    stop)  stop  ;;
esac

exit 0
